package com.letfox.user.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.letfox.user.dao.AccountDao;
import com.letfox.user.model.UAccount;
import com.letfox.user.service.AccountService;

@Service
public class AccountServiceImpl implements AccountService {
	
	@Autowired
	private  AccountDao accountDao;

	@Override
	public int save(UAccount account) {
		return accountDao.insert(account);
	}

	@Override
	public int update(UAccount account) {
		return accountDao.update(account);
	}

	@Override
	public int deleteById(Long id) {
		return accountDao.deleteById(id);
	}

	@Override
	public int deleteByIds(String ids) {
		return accountDao.deleteByIds(ids);
	}

	@Override
	public UAccount getById(Long id) {
		return accountDao.selectById(id);
	}

	@Override
	public List<UAccount> getList(UAccount account) {
		return accountDao.selectList(account);
	}

	@Override
	public UAccount getByAccount(String account) {
		return accountDao.selectByAccount(account);
	}

}
